package Operation;

/**
 * Creat with IntelliJ IDEA
 * Description
 * User: mamba24
 * Date: 2022-04-13
 * Time: 15:45
 * To BE A Better Person-2020-3-2
 */

import Book.BookList;

import java.util.Scanner;

/**
 * 查询图书
 */
public class SerOp implements IOoperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("请输入需要查询的书名>:");
        Scanner sc= new Scanner(System.in);
        String name= sc.nextLine();
        for (int i = 0; i < bookList.Used; i++) {
            if(name.equals(bookList.books[i].getName())){
                System.out.println(bookList.books[i]);
            }
        }
        System.out.println("=============查询成功========");
    }
}
